package com.liu.audio.asr;

import com.alibaba.dashscope.audio.asr.vocabulary.Vocabulary;
import com.alibaba.dashscope.audio.asr.vocabulary.VocabularyService;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;


public class VocabularyTest {
    public static String apiKey = "sk-d1c41de66c074fc686488ab227d32fbe";

    public static void main(String[] args) throws NoApiKeyException, InputRequiredException {

        //vocab-Drilling-23782be4a39b44a1a6a117ee246e8e4d
        //vocab-Drilling-44ce59a9208a4f7fbde52302ebfd1e26
        VocabularyService service = new VocabularyService(apiKey);

//        Vocabulary[] drillings = service.listVocabulary("Drilling");
//        Arrays.stream(drillings).forEach(i-> System.out.println(i.getVocabularyId()));

        Vocabulary vocabulary = service.queryVocabulary("vocab-Drilling-44ce59a9208a4f7fbde52302ebfd1e26");
        System.out.println(vocabulary);
        System.exit(0);
    }



}